package com.ScroringSystem.backend.mapper;

import com.ScroringSystem.backend.pojo.Contestant;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;
import org.springframework.stereotype.Service;

import java.util.List;

@Repository
@Mapper
public interface ContestantMapper extends BaseMapper<Contestant>{
    @Select("SELECT * FROM kob.contestant ORDER BY submitted DESC ")
    List<Contestant> selectOrderBy();

    @Select("select count(*) from kob.contestant")
    int countSelect();
}
